-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(DHIS2-16133): migrate to new tracker API #1951
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🚀 Deployed on https://pr-1951--dhis2-import-export.netlify.app |
kabaros
force-pushed
the
api-migration
branch
3 times, most recently
from
February 23, 2024 14:26
afc9135
to
01d94e7
Compare
we were assigning setting the state to an event in the new window. That reference doesn't work one outside the React app in the new window, so the loader never hides. Not sure if this pattern worked at some point, but even if it did, it was propbably disabled as a security issue
also change lastUpdateEndDate to updatedBefore, and lastUpdatedDuration to updatedWithin
…rolledAfter and same for endDate to enrollmentEnrolledBefore
and ensure that the parameter is not selected if ALL is chosen
kabaros
changed the title
chore: migrate to new tracker API
feat(DHIS2-16133): migrate to new tracker API
Mar 5, 2024
kabaros
requested review from
tomzemp and
a team
and removed request for
tomzemp
March 5, 2024 13:47
tomzemp
reviewed
Mar 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tomzemp
approved these changes
Mar 6, 2024
dhis2-bot
added a commit
that referenced
this pull request
Mar 6, 2024
# [101.0.0](v100.0.2...v101.0.0) (2024-03-06) ### Features * **DHIS2-16133:** migrate events and tracker entities to new tracker API ([#1951](#1951)) ([da9fbad](da9fbad)) ### BREAKING CHANGES * **DHIS2-16133:** migrate to new API for tracker import/export. This expects a format incompatible with previous versions. * fix: loader keeps showing when opening export in new page we were assigning setting the state to an event in the new window. That reference doesn't work one outside the React app in the new window, so the loader never hides. Not sure if this pattern worked at some point, but even if it did, it was propbably disabled as a security issue * feat: migrate TEI and Event export to new tracker API * feat: move Event import to new tracker endpoints * feat: move TEI import to new tracker endpoints * refactor: change TEI references to Tracked entity * fix(migration-events): change start and endDate to occuuredBefore and occuredAfter * fix(migration-trackedentity): change lastUpdateStartDate to updatedAfter also change lastUpdateEndDate to updatedBefore, and lastUpdatedDuration to updatedWithin * fix(migration-trackedentity): change programStateDate to enrollmentEnrolledAfter and same for endDate to enrollmentEnrolledBefore * fix(migration-trackedentity): change followupStatus to followup and ensure that the parameter is not selected if ALL is chosen * fix: lint issues * fix: update tests snapshots * refactor: apply code review comments
🎉 This PR is included in version 101.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates Tracker Entity and Event import/export to use the new Tracker API as described in the docs here.
implements DHIS2-16133
Changes in this PR
The commit messages should give an overview of the changes, but here are some more details:
/api/tracker/events
andapi/tracker/trackedEntities
instead of the oldapi/trackedEntityInstances
andapi/event
orgUnit
instead ofou
for defining the organisation unitatomicMode
field toALL
andOBJECT
(instead ofALL
andNONE
in the old API)none
from the options for Tracked Entity export filter, as the new API requires choosing eitherprogram
ortracked entity
startDate
andendDate
tooccuuredBefore
andoccuredAfter
lastUpdateStartDate
toupdatedAfter
,lastUpdateEndDate
toupdatedBefore
, andlastUpdatedDuration
toupdatedWithin
programStartDate
toenrollmentEnrolledAfter
(and also endDate)followupStatus
tofollowup
and ensure that the parameter is not sent if ALL is chosen (the new API expects true or false, or for it not to be provided in the case of ALL)